import request from '@/utils/request';

// 获取收入评估类型下拉
export function getIncomeType() {
  return request({
    url: process.env.VUE_APP_SERVICE_NAME + 'api/sysEnumDictionary/getListByPage',
    method: 'post',
    data: {
      queryStr: 'system_data_income_type',
      "pageNum": 1,
      "recordNum": 200
    }
  });
}

// 数据录入
export function saveSaleData(data) {
  let url = process.env.VUE_APP_SERVICE_NAME + 'api/sysSellerUser/create';
  if (data.objectId || data.objectId == 0) {
    url = process.env.VUE_APP_SERVICE_NAME + 'api/sysSellerUser/update';
  }
  return request({
    url: url,
    method: 'post',
    data
  });
}

// 获取数据列表
export function getDataList(searchForm) {
  return request({
    url: process.env.VUE_APP_SERVICE_NAME + 'api/sysSellerUser/getSysSellerUserListByPage',
    method: 'post',
    data: searchForm
  });
}

// 删除选中数据
export function deleteSelectedData(ids) {
  return request({
    url: process.env.VUE_APP_SERVICE_NAME + 'api/sysSellerUser/deleteByList',
    method: 'post',
    data: {
      keyValues: ids
    }
  });
}
